package com.kstech.mp3604.fragments

import com.kstech.mp3604.base.BaseDialogFragment
import com.kstech.mp3604.bean.StackCoordinate
import com.kstech.mp3604.databinding.FragmentDialogConfirmTaskBinding
import com.kstech.mp3604.ui.listener.DialogConfirmTaskListener

/**
 * 确认受领任务
 */
class DialogConfirmTaskFragment(
    val stack: StackCoordinate, val dialogConfirmTaskListener: DialogConfirmTaskListener
) : BaseDialogFragment<FragmentDialogConfirmTaskBinding>(FragmentDialogConfirmTaskBinding::inflate) {
    override fun onInitView() {
        binding.apply {
            confirmButton.setOnClickListener {
                dialogConfirmTaskListener.confirmTask(stack)
                dialog!!.cancel()
            }
            cancelButton.setOnClickListener {
                dialog!!.cancel()
            }
        }
    }
}